<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>무제 문서</title>

</head>

<body>
<?php

// 자동으로 따옴표 붙이기 (insert 때 사용)
function set_quotation(&$val, $key)
{
	$val = "'".$val."'";	
}

$arr = array(a,b,c,d);

array_walk($arr, "set_quotation");
$keys = array_keys($arr);

echo $fieldName = implode(', ', $keys);
echo "<br /><br />";

print_r($keys);
echo "<br /><br />";

print_r($arr);
echo "<br /><br />";

echo $fieldData = implode(', ', $arr);  // $fieldName, $fields 필드명





?>
</body>
</html>
